/* const qs = require('querystring');
let self_mw = (req,res,next)=>{
    let str = '';
    req.on('data',(chunk)=>{
        str+=chunk
    })

    req.on('end',()=>{
       let data = qs.parse(str);
       req.body = data;
       next()
    })
}

module.exports = self_mw */

/* const qs = require('querystring');
let self_mw = (req,res,next)=>{
    let str = '';
    req.on('data',(chunk)=>{
        str+=chunk
    })

    req.on('end',()=>{
       let data = qs.parse(str);
       req.body = data;
       next()
    })
}

module.exports = self_mw */

const qs = require('querystring');
let self_mw = (req,res,next)=>{
    let str = '';
    req.on('data',(chunk)=>{
        str+=chunk
    })

    req.on('end',()=>{
       let data = qs.parse(str);
       req.body = data;
       next()
    })
}

module.exports = self_mw